<html>
<head>
<#include "WEB-INF/view/_frag/_meta.ftl">
<title>用户操作</title>
<#include "WEB-INF/view/_frag/_jscss.ftl">
</head>
<body>
<div class="container">
    <div>
       <nav class="navbar navbar-default">
            <div class="container">
             <a class="navbar-brand" href="#"><span class="glyphicon glyphicon-cog"></span> 用户操作</a>
            </div>
        </nav>
        <form class="form-horizontal form-group-sm" action="${action}" method="post">
        <@token/>
			<input type="hidden" name="user.id" value="${user.id}"/>
            <div class="form-group">
                <label class="col-sm-5 control-label">姓名</label>
                <div class="col-sm-2">
                    <input class="form-control" name="user.name" value="${user.name}">
                <small class="text-danger">${error_name}</small>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-5 control-label">性别</label>
                <div class="col-sm-2">
                    <label class="radio-inline">
                       <#if (user.sex)!'男'=='男'> <input type="radio" name="user.sex" value="男" checked> 男
                       <#else><input type="radio" name="user.sex" value="男"> 男</#if>
                    </label>
                    <label class="radio-inline">
                       <#if user.sex=='女'> <input type="radio" name="user.sex" value="女" checked> 女
                       <#else><input type="radio" name="user.sex" value="女"> 女</#if>
                    </label>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-5 control-label">年龄</label>
                <div class="col-sm-2">
                    <input class="form-control" type="number" name="user.age" value="${(user.age!0)}">
                    <small class="text-danger">${error_age}</small>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 col-sm-offset-5">
                    <a class="btn btn-default" onclick="javascript:history.back()"><span class="glyphicon glyphicon-arrow-left"></span> 返回</a>
                    <button class="btn btn-primary"><span class="glyphicon glyphicon-ok"></span> 提交</button>
                </div>
            </div>
        </form>
	<#include "WEB-INF/view/_frag/_footer.ftl">
    </div>
</div>
</body>
</html>